<%@ Page Language="c#" Inherits="PHSRAG.Insight21.Humans.ListRequestPage" CodeFile="ListRequestPage.aspx.cs" %>

<%@ Register TagPrefix="cc2" Namespace="PHSRAG.WebControls" Assembly="PHSRAG.WebControls" %>
<%@ Register TagPrefix="cc1" Namespace="PHSRAG.Insight21.InsightWebControls" Assembly="PHSRAG.Insight21.InsightWebControls" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>ListRequest</title>
    <link href="../Insight21.css" type="text/css" rel="stylesheet" />

    <script language="javascript" type="text/javascript">
		function ToggleSelection(triggerer,actOn){
			var triggerer = document.getElementById(triggerer);
			if(triggerer != null && triggerer.checked)
			{
				var element = document.getElementById(actOn);
				if(element != null)
				{
					element.checked=false;
				}
			}
		}
    </script>

</head>
<body>
    <form id="Form1" method="post" runat="server">
        <table width="100%">
            <tr>
                <td>
                    <cc1:Header ID="header" runat="server" OnNavigate="OnHeaderNavigate"></cc1:Header>
                </td>
            </tr>
            <tr style="display: none">
                <td>
                    <cc1:AdminSubNavigation ID="adminSubNavigation" runat="server" Visible="false"></cc1:AdminSubNavigation>
                </td>
            </tr>
            <tr>
                <td>
                    <cc1:AdminHumansSubNavigation ID="adminHumansSubNavigation" runat="server"></cc1:AdminHumansSubNavigation>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        <table class="PlaceBar" width="100%">
            <tr>
                <td align="left">
                    <cc2:BreadCrumb ID="breadCrumb" runat="server" OnNavigate="OnHeaderNavigate"></cc2:BreadCrumb>
                </td>
                <td align="right">
                    <cc2:DownloadBar ID="downloadBar" runat="server"></cc2:DownloadBar>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td>
                    <cc2:ActivityIndicator ID="activityIndicator" runat="server"></cc2:ActivityIndicator>
                </td>
            </tr>
        </table>
        <cc2:PostbackGuard ID="postbackGuard" runat="server"></cc2:PostbackGuard>
        <table>
            <tr>
                <td>
                    <cc2:Annunciator ID="annunciator" runat="server"></cc2:Annunciator>
                </td>
            </tr>
        </table>
        <asp:Panel ID="gridContainer" runat="server">
            <table class="DataTitle" cellspacing="0" width="100%">
                <tr>
                    <td>
                        List Request |
                        <asp:Label ID="recordCount" runat="server"></asp:Label>&nbsp;Records&nbsp;
                    </td>
                </tr>
            </table>
            <table cellspacing="0" width="100%">
                <tr>
                    <td>
                        <cc2:Pager ID="topPager" runat="server" OnFirstPage="OnFirstPage" OnLastPage="OnLastPage"
                            OnNextPage="OnNextPage" OnPreviousPage="OnPreviousPage"></cc2:Pager>
                    </td>
                </tr>
            </table>
            <table cellspacing="0" width="100%">
                <tr>
                    <td>
                        <asp:DataGrid ID="listRequestGrid" runat="server" EnableViewState="true" Width="100%"
                            AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True" CssClass="DataGrid"
                            AllowCustomPaging="True" OnItemCommand="OnItemCommand" OnItemCreated="OnItemCreated"
                            OnItemDataBound="OnItemDataBound" OnSortCommand="OnSort">
                            <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                            <ItemStyle CssClass="DataGridItem"></ItemStyle>
                            <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                            <Columns>
                                <asp:BoundColumn DataField="Category" SortExpression="Category" ReadOnly="True" HeaderText="Category">
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="ProtocolNumber" SortExpression="ProtocolNumber" HeaderText="Protocol #">
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="TruncatedTitle" HeaderText="Title" SortExpression="TruncatedTitle">
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="DateCreated" SortExpression="DateCreated" ReadOnly="True"
                                    HeaderText="Requested On"></asp:BoundColumn>
                                <asp:ButtonColumn DataTextField="Name" SortExpression="Name" HeaderText="Name"></asp:ButtonColumn>
                                <asp:BoundColumn DataField="Submitter" SortExpression="Submitter" ReadOnly="True"
                                    HeaderText="Submitter"></asp:BoundColumn>
                                <asp:TemplateColumn HeaderText="Accept">
                                    <HeaderStyle Width="5%"></HeaderStyle>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="accept" runat="server" TextAlign="Left"></asp:CheckBox>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="Reject">
                                    <HeaderStyle Width="5%"></HeaderStyle>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="reject" runat="server" TextAlign="Left"></asp:CheckBox>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                            </Columns>
                            <PagerStyle Visible="false"></PagerStyle>
                        </asp:DataGrid></td>
                </tr>
            </table>
            <table cellspacing="0" width="100%">
                <tr>
                    <td>
                        <cc2:Pager ID="bottomPager" runat="server" OnFirstPage="OnFirstPage" OnLastPage="OnLastPage"
                            OnNextPage="OnNextPage" OnPreviousPage="OnPreviousPage"></cc2:Pager>
                    </td>
                </tr>
            </table>
            <table cellspacing="0" width="100%">
                <tr>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Button ID="updateButton" CssClass="fixedWidthButton" runat="server" Text="Update"
                            OnClick="OnUpdate"></asp:Button></td>
                </tr>
            </table>
        </asp:Panel>
    </form>
</body>
</html>
